﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbDiploma.Entities
{
    public class UserEntity
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int UserId { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string NickName { get; set; }

        public string VkId { get; set; }
        public string FbId { get; set; }
        public string TwId { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }

        public virtual ICollection<UserEntity> Friends { get; set; }

        public virtual RoleEntity Role { get; set; }

        public virtual ICollection<PermissionEntity> Permissions { get; set; }

        public virtual ICollection<LikeEntity> Likes { get; set; }
        public virtual ICollection<CommentEntity> Comments { get; set; }
        public virtual ICollection<SubscriptionEntity> Subscriptions { get; set; }

        public virtual SessionEntity Session { get; set; }
        public virtual ICollection<FollowerEntity> Follows { get; set; }

        public virtual ICollection<LogEntity> Logs { get; set; }
    }
}
